Introduce light node & refactor RPC client#681
Conversation
|
Is there a concern that this won't stop? |
tzdybal
left a comment
There was a problem hiding this comment.
I think it would be cleaner to have following structure:
- node:
- node.go
- full:
- node.go, client.go, etc...
- light:
- node.go, client.go, etc...
|
@S1nus @tzdybal not sure why we need a separate package "full"? we could simply put them all under "node" package: will this not be sufficient? i would only make separate package if we expect repeated functionalities for full and light nodes. But then, we would end up duplicating lot of code. |
|
I requested for introducing directories, because I felt like For some context: #661 Both full and light nodes will implement simplified |
in this case, why not have this? this clearly distinguish full and light implementations and then client refers to full client and for light node client, we can use lightclient? |
Codecov Report
@@ Coverage Diff @@
## main #681 +/- ##
==========================================
+ Coverage 54.49% 54.57% +0.08%
==========================================
Files 49 52 +3
Lines 10305 10372 +67
==========================================
+ Hits 5616 5661 +45
- Misses 3820 3842 +22
Partials 869 869
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
one nice advantage of this organization is that i can make but i don't have a strong preference, it works either way |
|
You convinced me! Let's use convention proposed by @gupadhyaya . |
tzdybal
left a comment
There was a problem hiding this comment.
Left some comments. This design looks good 👍
|
@S1nus you should also enforce the interface binding by adding |
@tzdybal |
Tendermint compatibility.
As function has multiple func (c *Client) eventsRoutine(sub types.Subscription, subscriber string, q tmpubsub.Query, outc chan<- ctypes.ResultEvent) {
defer close(outc)
// ...
} |
fixed? |
|
@tzdybal @gupadhyaya Going back to the discussion of folder structure/abstraction, as I was not part of that conversation yet. Did we consider the option of having the same architecture as celestia-node? https://github.com/celestiaorg/celestia-node/tree/main/nodebuilder |
Hmm not sure. It is similar, the main difference is RollKit does not use Fx. |
Overview
Goal is to refactor
rpc/server.go/Serverto accept thetendermint/rpc/clientinterfaceCloses #662; Closes #663; Closes #664; Closes #682.
Checklist